package cn.liontalk.concurrent;

public class InterruptClientTest {
    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread(() -> {
            for (int i = 0; i < 100; i++) {
                System.out.println("I'm doing my work");
                System.out.println("I'm interrupted?" + Thread.currentThread().isInterrupted());
            }
        });
        thread.start();
        Thread.sleep(1);
        thread.interrupt();
    }
}
